<template>
    <div class="lego-field-container">
        <slot></slot>
    </div>
</template>
<script>
import {defineComponent} from 'vue';
import {useField} from '../hooks';

export default defineComponent({
    props: {
        fieldConfig: {
            type: Object,
            default: () => ({})
        }
    },
    setup(props) {
        const {field} = useField(props.fieldConfig);
        return {
            field
        };
    }
});
</script>